/*
 * Copyright (c) 2011, Daniel Kuenne
 * 
 * This file is part of TrafficJamDroid.
 *
 * TrafficJamDroid is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * TrafficJamDroid is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with TrafficJamDroid.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.traffic.services;

/**
 * Superclass for all services which run in an infinite loop.
 * 
 * @author Daniel Kuenne
 * @version $LastChangedRevision: 220 $
 */
public abstract class Service extends Thread {

	@Override
	public void run() {
		for (;;) {
			serve();
		}
	}

	/**
	 * Abstract method containing the logic of the service
	 */
	protected abstract void serve();
}
